package com.pan.games.array;

import java.util.Arrays;

/**
 * 三维数组可以看做一个立方体
 * 四维数组可以看做一条立方体
 * 五维数组看做一个面的立方体
 * 六维数组看做一个立方体的立方体
 * @author by panstark
 * @description
 * @notice
 * @date 2020/12/22
 */
public class BasicTDArrayPlayer {

    public static int[][][] DDArray = new int[10][10][10];

    static{
        for (int i = 0; i < DDArray.length; i++) {
            int[][] plane = DDArray[i];
            for (int i1 = 0; i1 < plane.length; i1++) {
                int[] row = plane[i1];
                for (int i2 = 0; i2 < row.length; i2++) {
                    row[i2] = i*100+i1*10+i2;
                }
            }
        }
    }

    public static void main(String[] args) {

        for (int i = 0; i < DDArray.length; i++) {
            int[][] plane = DDArray[i];
            System.out.println(String.format("----第%s个平面-----",i));
            for (int i1 = 0; i1 < plane.length; i1++) {
                int[] row = plane[i1];
                System.out.println(Arrays.toString(row));
            }
        }
    }
}
